class Solution:
    def replaceDigits(self, s: str) -> str:
        n = len(s)
        ans = ""
        for i in range(n):
            if i % 2 == 0:
                ans += s[i]
            else:
                ans += chr(ord(s[i - 1]) + int(s[i]))
        return ans


if __name__ == '__main__':
    sol = Solution()
    print(sol.replaceDigits(s="a1c1e1"))
    print(sol.replaceDigits(s="a1b2c3d4e"))
